package com.pocket.cloud.payment.entity;

import io.mybatis.provider.Entity;
import lombok.Getter;
import lombok.Setter;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.SelectKey;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 【pocket-payment-Mapper5-2】
 * 表名：tz_order_settlement
 *
 * @author zhaozhile
 */
@Setter
@Getter
@Entity.Table("tz_order_settlement")
public class OrderSettlement {
    /**
     * 支付结算单据ID
     */
    @Entity.Column(value = "settlement_id", remark = "settlement_id", id = true, useGeneratedKeys = false)
    private Long settlementId;

    /**
     * 支付单号
     */
    @Entity.Column(value = "pay_no")
    private String payNo;

    /**
     * 外部订单流水号
     */
    @Entity.Column(value = "biz_pay_no")
    private String bizPayNo;

    /**
     * order表中的订单号
     */
    @Entity.Column(value = "order_number")
    private String orderNumber;

    /**
     * 支付方式 1 微信支付 2 支付宝
     */
    @Entity.Column(value = "pay_type")
    private Integer payType;

    /**
     * 支付方式名称
     */
     @Entity.Column(value = "pay_type_name")
    private String payTypeName;

    /**
     * 支付金额
     */
     @Entity.Column(value = "pay_amount")
    private BigDecimal payAmount;

    /**
     * 是否清算 0:否 1:是
     */
     @Entity.Column(value = "is_clearing")
    private Integer isClearing;

    /**
     * 用户ID
     */
     @Entity.Column(value = "user_id")
    private String userId;

    /**
     * 创建时间
     */
     @Entity.Column(value = "create_time")
    private Date createTime;

    /**
     * 清算时间
     */
     @Entity.Column(value = "clearing_time")
    private Date clearingTime;

    /**
     * 版本号
     */
    private Integer version;

    /**
     * 支付状态
     */
     @Entity.Column(value = "pay_status")
    private Integer payStatus;

}